package com.ruoyi.admin.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.admin.mapper.DrugsMapper;
import com.ruoyi.admin.domain.Drugs;
import com.ruoyi.admin.service.IDrugsService;

/**
 * drugsService业务层处理
 * 
 * @author ruoyi
 * @date 2023-01-11
 */
@Service
public class DrugsServiceImpl implements IDrugsService 
{
    @Autowired
    private DrugsMapper drugsMapper;

    /**
     * 查询drugs
     * 
     * @param id drugs主键
     * @return drugs
     */
    @Override
    public Drugs selectDrugsById(Long id)
    {
        return drugsMapper.selectDrugsById(id);
    }

    /**
     * 查询drugs列表
     * 
     * @param drugs drugs
     * @return drugs
     */
    @Override
    public List<Drugs> selectDrugsList(Drugs drugs)
    {
        return drugsMapper.selectDrugsList(drugs);
    }

    /**
     * 新增drugs
     * 
     * @param drugs drugs
     * @return 结果
     */
    @Override
    public int insertDrugs(Drugs drugs)
    {
        return drugsMapper.insertDrugs(drugs);
    }

    /**
     * 修改drugs
     * 
     * @param drugs drugs
     * @return 结果
     */
    @Override
    public int updateDrugs(Drugs drugs)
    {
        return drugsMapper.updateDrugs(drugs);
    }

    /**
     * 批量删除drugs
     * 
     * @param ids 需要删除的drugs主键
     * @return 结果
     */
    @Override
    public int deleteDrugsByIds(Long[] ids)
    {
        return drugsMapper.deleteDrugsByIds(ids);
    }

    /**
     * 删除drugs信息
     * 
     * @param id drugs主键
     * @return 结果
     */
    @Override
    public int deleteDrugsById(Long id)
    {
        return drugsMapper.deleteDrugsById(id);
    }
}
